#include "my_spin_group.h"

My_spin_group::My_spin_group(const QString &title, QWidget *parent) : QGroupBox(title, parent)
{
    setAlignment(Qt::AlignCenter);
    lf = new My_spin("左前", this);
    rf = new My_spin("右前", this);
    lb = new My_spin("左后", this);
    rb = new My_spin("右后", this);
    layout = new QGridLayout();
    layout->addWidget(lf, 0, 0);
    layout->addWidget(rf, 0, 1);
    layout->addWidget(lb, 1, 0);
    layout->addWidget(rb, 1, 1);
    layout->setContentsMargins(LEFT_M, TOP_M, RIGHT_M, BOTTOM_M);
    layout->setSpacing(SPACE_SON);
    this->setLayout(layout);
}

void My_spin_group::setSingleStep(double val)
{
    lf->setSingleStep(val);
    rf->setSingleStep(val);
    lb->setSingleStep(val);
    rb->setSingleStep(val);
}

void My_spin_group::setMinimum(double val)
{
    lf->setMinimum(val);
    rf->setMinimum(val);
    lb->setMinimum(val);
    rb->setMinimum(val);
}
